// 引入mockjs
const Mock = require("mockjs");
// 获取 mock.Random 对象
const Random = Mock.Random;
import sup_1 from "../assets/sup_1.jpg";
import sup_2 from "../assets/sup_2.jpg";
import img_1 from "../assets/p_img_1.png";
import img_2 from "../assets/p_img_2.jpg";
import img_3 from "../assets/p_img_3.jpg";
import img_4 from "../assets/p_img_4.jpg";
import img_5 from "../assets/p_img_5.jpg";
import img_6 from "../assets/p_img_6.jpg";
// mock一组数据
const produceNewsData = function() {
  let articles = {
  errMessage: "",
  isSuccess: true,
  list: [],
  map: {
    supplierresources: [
      {
        fid: 3,
        fremark: "营业执照",
        ftype: "img",
        fscreenshoturl: sup_1,
        fclassname: "营业执照",
        furl: "/static/images/66D1EB3FEA054DF0A6C527767F7EAAF4.jpg"
      },
      {
        fid: 4,
        fremark: "生产许可证",
        ftype: "img",
        fscreenshoturl: sup_2,
        fclassname: "生产许可证",
        furl: "/static/images/8874E6CF2EF14C939160840F134911AD.jpg"
      }
    ],
    name: "黑龙江省食为股份天有限公司",
    photo: "/static/images/646C4492B6584430B307E63A878CBE85.jpg",
    remark: "",
    productpage: {
      pageNo: 1,
      pageSize: 6,
      results: [
        {
          fid: 126,
          fname: "五常有机稻花香",
          fproductphoto: img_1
        },
        {
          fid: 127,
          fname: "金福乔府大院",
          fproductphoto: img_2
        },
        {
          fid: 128,
          fname: "五常非转基因大米",
          fproductphoto: img_3
        },
        {
          fid: 129,
          fname: "天府乔家大院",
          fproductphoto: img_4
        },
        {
          fid: 130,
          fname: "通运乔家大院",
          fproductphoto: img_5
        },
        {
          fid: 131,
          fname: "长粒香五常专供",
          fproductphoto: img_6
        }
      ],
      totalCount: 6
    },
    paramslist: [
      {
        fname: "联系人",
        fvalue: "张茂",
        typevalue: "",
        type: "text"
      },
      {
        fname: "联系电话",
        fvalue: "13845289453",
        typevalue: "13845289453",
        type: "phone"
      },
      {
        fname: "地址",
        fvalue: "黑龙江省五常市乔府大院",
        typevalue: "128.053561,45.949183",
        type: "address"
      },
      {
        fname: "传真",
        fvalue: "0",
        typevalue: "",
        type: "text"
      },
      {
        fname: "开户行",
        fvalue: "中国工商银行",
        typevalue: "",
        type: "text"
      },
      {
        fname: "银行账号",
        fvalue: "6222023500030756586",
        typevalue: "",
        type: "text"
      },
      {
        fname: "法人",
        fvalue: "张茂",
        typevalue: "",
        type: "text"
      },
      {
        fname: "税号",
        fvalue: "930239452052",
        typevalue: "",
        type: "text"
      },
      {
        fname: "注册资金(万元)",
        fvalue: "6500.00",
        typevalue: "",
        type: "text"
      }
    ]
  },
  object: "",
  pageResult: null
}

  return {
    articles: articles
  };
};

// Mock.mock( url, post/get , 返回的数据)；
Mock.mock(/\/mockdata\/index/, "post", produceNewsData);
